package com.money.service;

import io.seata.rm.tcc.api.BusinessActionContext;
import io.seata.rm.tcc.api.LocalTCC;
import io.seata.rm.tcc.api.TwoPhaseBusinessAction;

import java.util.ArrayList;

@LocalTCC
public interface PayService {


    @TwoPhaseBusinessAction(name = "payOrder", commitMethod = "confirmOrder", rollbackMethod = "cancelOrder")
    void payOrder(ArrayList<Integer> ctId);

    boolean confirmOrder(BusinessActionContext businessActionContext);

    boolean cancelOrder(BusinessActionContext businessActionContext);
}
